<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<meta name="description" content="Achievement Information System">
		<meta name="author" content="GarudaTechno">
		<title>SIAbs</title>
		
		<link href="<?php echo base_url(); ?>assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
		<link href="<?php echo base_url(); ?>assets/css/redmond/jquery-ui-1.10.4.custom.css" rel="stylesheet" type="text/css" />
		<link href="<?php echo base_url(); ?>assets/jtable/themes/lightcolor/blue/jtable.css" rel="stylesheet" type="text/css" />
		
		<script src="<?php echo base_url(); ?>assets/js/jquery-1.11.0.min.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/js/bootstrap.min.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/js/jquery-ui-1.10.4.custom.min.js" type="text/javascript"></script>
		<script src="<?php echo base_url(); ?>assets/jtable/jquery.jtable.js" type="text/javascript"></script>
	</head>
	<body>
		<div class="container">
			<div class="panel panel-default">
				<div class="panel-heading" style="background-color:#ffffff;">
					<h2>Sistem Informasi Absensi</h2>
				</div>
				<div class="panel-body">
					<div class="row">
						<div class="col-md-3">
							<div class="panel panel-default">
								<div class="panel-body" align="justify">
									<?php if(!isset($_SESSION[SESSION_USERID])){ ?>
										<div class="col-md-12"><?php echo $this->session->flashdata('msg'); ?></div>
										<form role="form" action="c_login/verification" method="post">
											<div class="form-group">
												<label for="login_username" class="control-label">Username</label>
												<input type="text" class="form-control" id="login_username" name="login_username">
											</div>
											<div class="form-group">
												<label for="login_password" class="control-label">Password</label>
												<input type="password" class="form-control" id="login_username" name="login_password">
											</div>
											<div class="form-group">
												<button type="submit" class="btn btn-info btn-block">Login</button>
											</div>
										</form>
									<?php }else{ ?>
										<ul class="nav nav-pills nav-stacked" id="mainmenu">
											<li pages="settingpers"><a href="#">Setting Perusahaan</a></li>
											<li pages="kehadiran"><a href="#">Setting Kehadiran</a></li>
											<li pages="jamkerja"><a href="#">Jam Kerja</a></li>
											<li pages="libur"><a href="#">Hari Libur</a></li>
											<li pages="departement"><a href="#">Departement</a></li>
											<li pages="karyawan"><a href="#">Karyawan</a></li>
											<li pages="dinas"><a href="#">Dinas Pegawai</a></li>
											<li pages="laporan"><a href="#">Laporan</a></li>
											<li pages="login/logout"><a href="#">Logout</a></li>
										</ul>
									<?php } ?>
								</div>
							</div>
						</div>
						<div class="col-md-9" id="maincontent"></div>
					</div>
				</div>
				<div class="panel-footer" align="center">
					&copy; 2014, SIAbs | Sistem Informasi Absensi
				</div>
			</div>
		</div>
		<script>
			$(document).ready(function(){
				$("#mainmenu li").click(function(){
					var elm = $(this);
					var link = elm.attr("pages");
					if(link == "login" || link == "login/logout"){
						window.location="c_"+link;
					}else{
						$("#maincontent").empty();
						$("#maincontent").load('c_'+link);
					}
				});
				$("#maincontent").load('c_main/welcome');
			});
		</script>
	</body>
</html>